package com.ruoyi.quartz.task;


import com.ruoyi.quartz.service.impl.TaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

@Slf4j
@Configuration      //1.主要用于标记配置类，兼备Component的效果。
@EnableScheduling
public class GetTokenTask {

    @Autowired
    private TaskService taskService;


    //螃蟹token
    @Scheduled(cron = "0 0/10 * * * ?")
    private void pushPANGXIEGetTokenApi() {
        taskService.pushPANGXIEGetTokenApi();
    }

    @Scheduled(cron = "0 0 0/20 * * ?")
    private void pushJINGYUGetTokenApi() {
        taskService.pushJINGYUGetTokenApi(70l);
    }

    //标签同步
    @Scheduled(cron = "0 0 0/50 * * ?")
    private void pushCHANGYOUGetTokenApi() {
        taskService.pushCHUANGYOUGetTokenApi(66l);
    }

    @Scheduled(cron = "0 0/5 * * * ?")
    private void pushMONIMIMAGetTokenApi() {

        taskService.pushMONIMIMAGetTokenApi();
    }

    @Scheduled(cron = "0 0/5 * * * ?")
    private void pushYISHOUYOUGetTokenApi() {

        taskService.pushYISHOUYOUGetTokenApi();
    }

    @Scheduled(cron = "0 0/1 * * * ?")
    private void pushYOUXIGEGetTokenApi() {

        taskService.pushYOUXIGEGetTokenApi();
    }

    @Scheduled(cron = "0 0/10 * * * ?")
    private void pushMONI7881GetTokenApi() {

        taskService.pushMONI7881GetTokenApi();
    }

    //淘号号token
    @Scheduled(cron = "0 0/20 * * * ?")
    private void pushTAOHAOHAOGetTokenApi() {
        taskService.pushTAOHAOHAOGetTokenApi();
    }

}
